#ifndef SL_DIRANIMATION_HPP
#define SL_DIRANIMATION_HPP

// std Header
#include <vector>

// Eigene Header
#include "Animation.hpp"
#include "Direction.hpp"

namespace sl
{
	class DirAnimation : public Animation, public Direction
	{
	public:
		DirAnimation();
		DirAnimation(const Animation& anim);

	protected:
		std::vector<FrameInfo> myFrameInfos[Direction::Count];

	public:
		virtual DirAnimation* AddFrame(const FrameInfo& info);
		virtual DirAnimation* AddFrame(Direction::Dir dir, const FrameInfo& info);
		virtual DirAnimation* AddFrame(unsigned int frame, unsigned int delay, const sf::Vector2i& offset = sf::Vector2i(0, 0));
		virtual DirAnimation* AddFrame(Direction::Dir dir, unsigned int frame, unsigned int delay, const sf::Vector2i& offset = sf::Vector2i(0, 0));
		virtual DirAnimation* SetSize(const sf::Vector2i& size = sf::Vector2i(1, 1));

	protected:
		virtual sf::IntRect GetFrame();

	public:
		virtual DirAnimation* Start();
		virtual DirAnimation* Stop();
		virtual DirAnimation* Pause();
		virtual DirAnimation* Restart();
		virtual DirAnimation* Update(float time);

	public:
		virtual DirAnimation* SetDirection(Direction::Dir dir);
	};
}

#endif //SL_DIRANIMATION_HPP